<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.jimet.server.*"%>
<div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
 
 
 <script>
 
 function sendContact()
{
	 var divId = "contact-form";
		if ( $('#'+divId+'Loading').length == 0 ){
			$("#"+divId).append("<div id=\""+divId+"Loading\" class=\"loadingDiv\"></div>");
		}
		loadDiv = $('#'+divId+'Loading');
		var mypos = $('#'+divId).position();
		loadDiv.css({top: mypos.top + "px"});
		loadDiv.height($('#'+divId).height());
		loadDiv.width($('#'+divId).width());
		loadDiv.hide();
		loadDiv.ajaxStart(function() {$(this).show();});
		
	 
	 
	 var name = $("#name-contact").val();
	 var mail = $("#mail-contact").val();
	 var description = $("#description-contact").val();
	 
	 
	 
	 
	 
	$.ajax({ 
		  type: "POST",
		  url: "<%=JimetConfiguration.getString("APPLICATION.URL")%>/static/process/contactProcess.jsp",
		  data: { name : name , mail:mail , description:description }
		})
		  .done(function( msg ) {
			$("#sendButton").hide();
		   	$(".modal-body").html("<p>Mesajınız ulaştırılmıştır.Teşekkür ederiz.</p>");
		   	
		  });
}
 </script>